package it.polimi.traveldream;

import it.polimi.traveldream.entities.Excursion;
import it.polimi.traveldream.entities.Hotel;
import it.polimi.traveldream.entities.Transport;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

/**
 * Session Bean implementation class GestioneBaseProduct
 */
@Stateless
public class GestioneHotel implements GestioneHotelLocal {

    /**
     * Default constructor. 
     */
	
	 @PersistenceContext
	 private EntityManager em;
	 
    public GestioneHotel() {
        // TODO Auto-generated constructor stub
    }
   
	
    @Override
	public void add(HotelDTO hotelDTO) {
    	System.out.print("persistent");
		em.persist(new Hotel(hotelDTO));
		
	}
    
  

}
